home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / inptmthd.sit / Input Methods / card_3715.txt < prev    next >
Text File  |  1989-11-24  |  4KB  |  173 lines

  1. -- card: 3715 from stack: in
  2. -- bmap block id: 3886
  3. -- flags: 4000
  4. -- background id: 2696
  5. -- name: Click Multiple Answers
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   clearButtons
  9.   hide card field "Hint"
  10.   hide card field "Silly"
  11.   pass closeCard
  12. end closeCard
  13.  
  14. on clearButtons
  15.   lock screen
  16.   repeat with b = 1 to the number of buttons
  17.     set the hilite of button b to false
  18.   end repeat
  19. end clearButtons
  20.  
  21. on mouseUp
  22.   -- if clicked on button toggle its hilite and check if all correct
  23.   if word 2 of the target is "button" then
  24.     set the hilite of the target to not the hilite of the target
  25.     put empty into states
  26.     put 0 into count
  27.     repeat with b = 1 to the number of buttons
  28.       if the hilite of button b then
  29.         put "Y" after states
  30.         add 1 to count
  31.       else put "n" after states
  32.     end repeat
  33.     -- correct if buttons 1, 3 & 5 selected
  34.     if states = "YnYnY" then
  35.       rightSound
  36.       wait 30
  37.       clearButtons
  38.     end if
  39.     if count > 3 then show card field "Hint"
  40.     else hide card field "Hint"
  41.     if states = "nYnYn" then
  42.       wrongSound
  43.       show card field "Silly"
  44.     else hide card field "Silly"
  45.   end if
  46. end mouseUp
  47.  
  48.  
  49.  
  50.  
  51. -- part 17 (button)
  52. -- low flags: 00
  53. -- high flags: 0000
  54. -- rect: left=17 top=96 right=240 bottom=120
  55. -- title width / last selected line: 0
  56. -- icon id / first selected line: 0 / 0
  57. -- text alignment: 1
  58. -- font id: 0
  59. -- text size: 12
  60. -- style flags: 0
  61. -- line height: 16
  62. -- part name: 
  63.  
  64.  
  65. -- part 18 (button)
  66. -- low flags: 00
  67. -- high flags: 0000
  68. -- rect: left=127 top=58 right=192 bottom=354
  69. -- title width / last selected line: 0
  70. -- icon id / first selected line: 0 / 0
  71. -- text alignment: 1
  72. -- font id: 0
  73. -- text size: 12
  74. -- style flags: 0
  75. -- line height: 16
  76. -- part name: 
  77.  
  78.  
  79. -- part 19 (button)
  80. -- low flags: 00
  81. -- high flags: 0000
  82. -- rect: left=356 top=55 right=171 bottom=497
  83. -- title width / last selected line: 0
  84. -- icon id / first selected line: 0 / 0
  85. -- text alignment: 1
  86. -- font id: 0
  87. -- text size: 12
  88. -- style flags: 0
  89. -- line height: 16
  90. -- part name: 
  91.  
  92.  
  93. -- part 20 (button)
  94. -- low flags: 00
  95. -- high flags: 0000
  96. -- rect: left=320 top=194 right=310 bottom=495
  97. -- title width / last selected line: 0
  98. -- icon id / first selected line: 0 / 0
  99. -- text alignment: 1
  100. -- font id: 0
  101. -- text size: 12
  102. -- style flags: 0
  103. -- line height: 16
  104. -- part name: 
  105.  
  106.  
  107. -- part 21 (button)
  108. -- low flags: 00
  109. -- high flags: 0000
  110. -- rect: left=80 top=248 right=316 bottom=282
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 0 / 0
  113. -- text alignment: 1
  114. -- font id: 0
  115. -- text size: 12
  116. -- style flags: 0
  117. -- line height: 16
  118. -- part name: 
  119.  
  120.  
  121. -- part 16 (field)
  122. -- low flags: 01
  123. -- high flags: 0002
  124. -- rect: left=141 top=196 right=235 bottom=334
  125. -- title width / last selected line: 0
  126. -- icon id / first selected line: 0 / 0
  127. -- text alignment: 0
  128. -- font id: 3
  129. -- text size: 14
  130. -- style flags: 0
  131. -- line height: 18
  132. -- part name: 
  133.  
  134.  
  135. -- part 22 (field)
  136. -- low flags: 81
  137. -- high flags: 0002
  138. -- rect: left=140 top=196 right=253 bottom=334
  139. -- title width / last selected line: 0
  140. -- icon id / first selected line: 0 / 0
  141. -- text alignment: 0
  142. -- font id: 3
  143. -- text size: 14
  144. -- style flags: 0
  145. -- line height: 18
  146. -- part name: Hint
  147.  
  148.  
  149. -- part 23 (field)
  150. -- low flags: 80
  151. -- high flags: 0002
  152. -- rect: left=140 top=196 right=235 bottom=334
  153. -- title width / last selected line: 0
  154. -- icon id / first selected line: 0 / 0
  155. -- text alignment: 1
  156. -- font id: 3
  157. -- text size: 14
  158. -- style flags: 0
  159. -- line height: 18
  160. -- part name: Silly
  161.  
  162.  
  163. -- part contents for card part 16
  164. ----- text -----
  165. Click on the pictures that are related.
  166.  
  167. -- part contents for card part 22
  168. ----- text -----
  169. You've selected too many things.  Click again to unselect some.
  170.  
  171. -- part contents for card part 23
  172. ----- text -----
  173. You are a very silly person!